aboutsummaryrefslogtreecommitdiff
path: root/src/app/manga/[title]/[id]/buttons.jsx
blob: 07fe3c3caf19bdc6925fb4c010d33840427c29fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import styles from "./info.module.css";
import Link from "next/link";

export default async function Buttons({ content: data }) {
	return (
		<div className={styles.ChapterContainer}>
			{data.chapters &&
				data.chapters.map((item, index) => {
					if (item.pages !== 0) {
						return (
							<Link
								href={{
									pathname: `/manga/info/read/${item.id}`,
									query: {
										name: item.title,
									},
								}}
							>
								<button key={index}>
									{item.volumeNumber} - {item.chapterNumber}
								</button>
							</Link>
						);
					}
				})}
		</div>
	);
}